package com.lelouch.examplecode.designpattern.factory.factorymethod;

/**
 * 简单工厂测试
 *
 * @author lcy
 * @create 2018-08-02 19:50
 */
public class FactoryTest {


    public static void main(String[] args) {
        //以前想要什么牛奶只能自己new，现在可以让工厂生产
        SimpleFactory factory = new SimpleFactory();

        System.out.println(factory.getMilk("伊利"));

        //AbstractFactory factory1 = new MengniuMilkFactory();
        //System.out.println(factory1.getMilk());
    }
}
